<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.ico">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://unpkg.com/@fortawesome/fontawesome-free@6.2.0/css/all.min.css" integrity="sha256-AbA177XfpSnFEvgpYu1jMygiLabzPCJCRIBtR5jGc0k=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://unpkg.com/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"blog.csgrandeur.com","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.13.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"default"},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta name="description" content="用 git 多年，网上 git 使用的博客也层出不穷，然而让学生使用 git 的时候，却困难重重。 找资料不如写资料，写篇小白入门，希望能有些效果。">
<meta property="og:type" content="article">
<meta property="og:title" content="用git管理自己的代码与文档">
<meta property="og:url" content="https://blog.csgrandeur.com/2021-03-31-git-newbie/index.html">
<meta property="og:site_name" content="CSGrandeur&#39;s Thinking">
<meta property="og:description" content="用 git 多年，网上 git 使用的博客也层出不穷，然而让学生使用 git 的时候，却困难重重。 找资料不如写资料，写篇小白入门，希望能有些效果。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://blog.csgrandeur.com/2021-03-31-git-newbie/line_ending_style.png">
<meta property="og:image" content="https://blog.csgrandeur.com/2021-03-31-git-newbie/git_bash_here.png">
<meta property="og:image" content="https://blog.csgrandeur.com/2021-03-31-git-newbie/gitee_setting.png">
<meta property="og:image" content="https://blog.csgrandeur.com/2021-03-31-git-newbie/gitee_ssh.png">
<meta property="og:image" content="https://blog.csgrandeur.com/2021-03-31-git-newbie/gitee_repo.png">
<meta property="og:image" content="https://blog.csgrandeur.com/2021-03-31-git-newbie/gitee_sshurl.png">
<meta property="og:image" content="https://blog.csgrandeur.com/2021-03-31-git-newbie/git_clone.png">
<meta property="article:published_time" content="2021-03-31T02:57:02.000Z">
<meta property="article:modified_time" content="2021-04-29T01:43:53.113Z">
<meta property="article:author" content="CSGrandeur">
<meta property="article:tag" content="tutorial">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://blog.csgrandeur.com/2021-03-31-git-newbie/line_ending_style.png">


<link rel="canonical" href="https://blog.csgrandeur.com/2021-03-31-git-newbie/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://blog.csgrandeur.com/2021-03-31-git-newbie/","path":"2021-03-31-git-newbie/","title":"用git管理自己的代码与文档"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>用git管理自己的代码与文档 | CSGrandeur's Thinking</title>
  
  <script class="next-config" data-name="google_analytics" type="application/json">{"tracking_id":"UA-69787882-2","only_pageview":true}</script>
  <script src="/js/third-party/analytics/google-analytics.js"></script>






  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">CSGrandeur's Thinking</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">Cogito Ergo Sum</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BB%80%E4%B9%88%E6%98%AFgit"><span class="nav-number">1.</span> <span class="nav-text">什么是git</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#git%E8%B5%B7%E6%AD%A5"><span class="nav-number">2.</span> <span class="nav-text">git起步</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85git%E5%AE%A2%E6%88%B7%E7%AB%AF"><span class="nav-number">2.1.</span> <span class="nav-text">下载安装git客户端</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE%E4%B8%AA%E4%BA%BA%E4%BF%A1%E6%81%AF%E5%8F%8A%E5%85%AC%E9%92%A5"><span class="nav-number">2.2.</span> <span class="nav-text">配置个人信息及公钥</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%B7%B2%E7%BB%8F%E5%8F%AF%E4%BB%A5%E5%BC%80%E5%A7%8B%E4%BD%BF%E7%94%A8%E4%BA%86"><span class="nav-number">2.3.</span> <span class="nav-text">已经可以开始使用了</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%90%8C%E6%AD%A5%E8%87%AA%E5%B7%B1%E7%9A%84%E4%BB%93%E5%BA%93"><span class="nav-number">2.4.</span> <span class="nav-text">同步自己的仓库</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#gitignore"><span class="nav-number">2.5.</span> <span class="nav-text">gitignore</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#tortoisegit"><span class="nav-number">3.</span> <span class="nav-text">TortoiseGit</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">CSGrandeur</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">30</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">5</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">21</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://blog.csgrandeur.com/2021-03-31-git-newbie/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="CSGrandeur">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="CSGrandeur's Thinking">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="用git管理自己的代码与文档 | CSGrandeur's Thinking">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          用git管理自己的代码与文档
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2021-03-31 10:57:02" itemprop="dateCreated datePublished" datetime="2021-03-31T10:57:02+08:00">2021-03-31</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">更新于</span>
      <time title="修改时间：2021-04-29 09:43:53" itemprop="dateModified" datetime="2021-04-29T09:43:53+08:00">2021-04-29</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/Tools/" itemprop="url" rel="index"><span itemprop="name">Tools</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <p>用 git 多年，网上 git 使用的博客也层出不穷，然而让学生使用 git 的时候，却困难重重。</p>
<p>找资料不如写资料，写篇小白入门，希望能有些效果。</p>
<span id="more"></span>
<hr>
<h2 id="什么是git">什么是git</h2>
<p>git（分布式版本控制系统）并不等同于github。</p>
<p>git是一个分布式版本控制软件，最初由林纳斯·托瓦兹创作，于2005年以GPL发布。</p>
<p>github提供git服务，其他网站当然也可以，自己也可以搭建git服务器。</p>
<p>今天改了代码，明天又改了，后天甲方爸爸说还是喜欢第一个版本……</p>
<p>用git可以方便的查看/回滚任意commit过的版本，并查看文本类文件的差异。</p>
<p>当然也可以当个文档云服务，方便地在不同地点同步自己的代码与文档。严格的版本控制能够保证文件不出差错。</p>
<p><strong>这里推荐大家使用git管理自己的ACM代码、解题报告、模板、技术日志等</strong>。</p>
<h2 id="git起步">git起步</h2>
<h3 id="下载安装git客户端">下载安装git客户端</h3>
<p>当然要有支持软件才可以：https://git-scm.com/</p>
<p>安装的时候有个细节要注意选择——</p>
<p>“Checkout as-is, commit Unix-style line endings”</p>
<img src="/2021-03-31-git-newbie/line_ending_style.png" class title="a">
<p>写代码的你们应该已经了解这个事情：Windows、OSX、Linux/Unix 的换行格式不一样（<code>\n</code>、<code>\r\n</code>...）</p>
<p>建议推送到git仓库的代码都是 Unix 格式的换行。</p>
<p>而Windows只要使用高级点的文本编辑器，换行显示都不是问题。</p>
<h3 id="配置个人信息及公钥">配置个人信息及公钥</h3>
<p>安装git软件之后就有git控制台了，任意位置右键打开它。</p>
<img src="/2021-03-31-git-newbie/git_bash_here.png" class title="b">
<p>执行以下三行，替换引号里的内容为自己的。遇到提示都默认回车。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git config --global user.name <span class="string">&quot;&lt;你的用户名&gt;&quot;</span></span><br><span class="line">git config --global user.email <span class="string">&quot;&lt;你的邮箱&gt;&quot;</span></span><br><span class="line">ssh-keygen -t rsa -C <span class="string">&quot;&lt;你的邮箱&gt;&quot;</span></span><br></pre></td></tr></table></figure>
<p>对于新手小白，不用太关心这些是什么。特别是第三行以及下面的内容，如果想搞清楚，可以去了解一下<a target="_blank" rel="noopener" href="https://zh.wikipedia.org/wiki/RSA%E5%8A%A0%E5%AF%86%E6%BC%94%E7%AE%97%E6%B3%95">RSA加密算法</a>，简单来说是让你本地生成一个钥匙和一个锁，等下要把锁传给服务器用来锁你的代码。而钥匙只有你的本地有，能理解个大概吧。</p>
<p>github的网速慢，可能还需要梯子。对于新手的你，就用开源中国的git服务吧，很快也很好用：</p>
<p>https://gitee.com/</p>
<p>注册账号一通操作（认真对待账号邮箱与手机号。总忘密码不是快乐的事情）</p>
<p>进入账号设置，找到ssh公钥设置进行填写。</p>
<img src="/2021-03-31-git-newbie/gitee_setting.png" class title="c">
<img src="/2021-03-31-git-newbie/gitee_ssh.png" class title="d">
<p>公钥字符串就是你的锁，它就是刚刚<code>ssh-keygen -t rsa -C "&lt;你的邮箱&gt;"</code>这行代码在你的系统里生成的：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">C:\Users\&lt;你的windows用户名&gt;\.ssh\id_rsa.pub</span><br></pre></td></tr></table></figure>
<p>注意：这个目录有 <code>id_rsa</code> 和 <code>id_rsa.pub</code>，“pub”一看就能分辨这个才是“公”钥咯。</p>
<p>用vscode或者什么文本编辑器打开这个文件，复制全部内容，贴在gitee的那个地方，点确定，gitee就有你的锁（公钥）来保护你的代码了。</p>
<p>私钥不需要另外的配置，git软件会自动到这个路径找你的私钥去开锁帮你读写服务器上的代码。</p>
<h3 id="已经可以开始使用了">已经可以开始使用了</h3>
<p>在gitee里建一个自己的仓库</p>
<img src="/2021-03-31-git-newbie/gitee_repo.png" class title="e">
<p>进入仓库，复制仓库的管理链接，我们配置的是ssh方式的（ssh一般基于RSA加密，就是上面的钥匙和锁的事情）</p>
<img src="/2021-03-31-git-newbie/gitee_sshurl.png" class title="f">
<p>到自己本地的工作目录（就是自己想要存放、管理代码或文档的目录）</p>
<p>打开前面配置git的那个控制台（右键-&gt;git bash here），用git指令把代码克隆下来（当然新仓库啥都没有）</p>
<img src="/2021-03-31-git-newbie/git_clone.png" class title="g">
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> &lt;刚刚复制的ssh地址&gt;</span><br></pre></td></tr></table></figure>
<p>正常情况仓库就到了本地了，会有一个你仓库名字的文件夹，比如<code>my-acm-code</code>。文件夹里有一个隐藏文件夹“<code>.git</code>”，这就是你本地的仓库。</p>
<p>这里举个例子，仓库放在了这里：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">E:\workspace\my-acm-code</span><br></pre></td></tr></table></figure>
<p>你的仓库就是隐藏文件夹</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">E:\workspace\my-acm-code\.git</span><br></pre></td></tr></table></figure>
<p>在仓库文件夹里（<code>E:\workspace\my-acm-code</code>）随便存放和编辑代码或文档吧。</p>
<p>当想要保存版本的时候，在你的仓库文件夹里（<code>E:\workspace\my-acm-code</code>）打开控制台。当然在控制台里切换到这个路径也可以。这可能需要一些基础的命令行知识，比如小学时候学的dos指令（windows下）或者了解过linux的shell指令。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git add .</span><br></pre></td></tr></table></figure>
<p>可能什么都不发生，也可能有一些提示，这是把“还没加入版本控制的文件”加入到版本控制里。</p>
<p>然后</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git commit -am <span class="string">&quot;&lt;你的备注&gt;&quot;</span></span><br></pre></td></tr></table></figure>
<p>git要求你对每次commit的版本做个注释，这样方便你回忆这次commit了个什么。当然你可以胡乱填写。</p>
<p>如果不写这个引号的部分，那么git会为你进入一个vim编辑界面。有个梗是“如何得到一串随机字符串？——给一个小白进入vim，让他想办法退出”，那会更难受些，vim怎么用这里就不讲了，在自己了解vim编辑之前，乖乖把备注写在同一行里吧。</p>
<p>这行执行之后，你的代码版本就被保存在了本地仓库里了（就是隐藏的<code>.git</code>里）。</p>
<p>但是gitee的服务器并不知道，想享受git云服务，那还得把你本地的仓库推到服务器上去，就是</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git push</span><br></pre></td></tr></table></figure>
<p>好了，一次完整的版本管理操作完成了。看看gitee网站上仓库的内容，已经和自己本地一致了。</p>
<p>小小总结一下：</p>
<ol type="1">
<li>下载安装git软件</li>
<li>git config 配置个人信息</li>
<li>ssh-keygen 生成私钥公钥（钥匙和锁）</li>
<li>注册gitee账号，配置gitee公钥</li>
<li>在gitee网页上建立自己的仓库</li>
<li>在仓库里复制ssh地址</li>
<li>本地git clone这个仓库</li>
<li>编辑自己的代码/文档</li>
<li><code>git add .</code></li>
<li><code>git commit -am "&lt;你的备注&gt;"</code></li>
<li><code>git push</code></li>
</ol>
<h3 id="同步自己的仓库">同步自己的仓库</h3>
<p>换一台新电脑，当然还得 <code>git clone</code> ，这不用说了。</p>
<p>而在家里和宿舍两台电脑都有了仓库，得保持一致吧。</p>
<p>宿舍里 <code>git push</code> 了，回到家，仓库还是旧版本。</p>
<p>这时候用 <code>git pull</code>，把最新的仓库从 gitee 上拉下来。</p>
<p>然后就可以正常的继续自己的工作了。</p>
<h3 id="gitignore">gitignore</h3>
<p>仓库的目录下可以建一个<code>.gitignore</code>文件，里面描述不想加入版本控制的文件。</p>
<p>比如一个写代码的仓库，你经常会编译出 <code>main.exe</code> 文件，它不需要“云同步”，不需要版本控制，而且把它推到仓库里的话，还挺占空间。</p>
<p>我们在<code>.gitignore</code>里加上<code>*.exe</code>，这样无论怎样 add commit push，仓库里的<code>.exe</code>文件都会雷打不动地留在本地了。</p>
<p>想要有更丰富的<code>gitignore</code>方式，可以去了解一下<a target="_blank" rel="noopener" href="https://zh.wikipedia.org/wiki/%E9%80%9A%E9%85%8D%E7%AC%A6">通配符</a>以及<code>.gitignore</code>的写法。</p>
<h2 id="tortoisegit">TortoiseGit</h2>
<p>TortoiseGit是个帮助我们使用git的软件。</p>
<p>命令行恐惧症？可以额外装一个 TortoiseGit：https://tortoisegit.org/download/</p>
<p>它可以帮你用鼠标代替上面那些命令行操作，自己摸索吧。</p>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/tutorial/" rel="tag"># tutorial</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2020-11-27-hncpc-every-year/" rel="prev" title="HNCPC历年Rank">
                  <i class="fa fa-chevron-left"></i> HNCPC历年Rank
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2021-03-31-chain-graph-template/" rel="next" title="图的前向星表示（带注释）">
                  图的前向星表示（带注释） <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    <div class="comments utterances-container"></div>
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">CSGrandeur</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <script src="https://unpkg.com/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://unpkg.com/@next-theme/pjax@0.5.0/pjax.min.js" integrity="sha256-3NkoLDrmHLTYj7csHIZSr0MHAFTXth7Ua/DDt4MRUAg=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  
<script src="https://unpkg.com/hexo-generator-searchdb@1.4.1/dist/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>





  




  

  <script class="next-config" data-name="enableMath" type="application/json">true</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://unpkg.com/mathjax@3.2.2/es5/tex-mml-chtml.js","integrity":"sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>


<script class="next-config" data-name="utterances" type="application/json">{"enable":true,"repo":"CSGrandeur/csgrandeur.github.io","issue_term":"pathname","theme":"github-light"}</script>
<script src="/js/third-party/comments/utterances.js"></script>

</body>
</html>
